import { defineStore } from "pinia";
import { reactive } from "vue";
import type {RoutesListState} from './types/index'

export const useRoutesList = defineStore('routesList',()=>{
    const state = reactive<RoutesListState>({
        routesList: [],
		isColumnsMenuHover: false,
		isColumnsNavHover: false,
    })
    async function setRoutesList(data: Array<string>) {
        state.routesList = data;
    }
    async function setColumnsMenuHover(bool: Boolean) {
        state.isColumnsMenuHover = bool;
    }
    async function setColumnsNavHover(bool: Boolean) {
        state.isColumnsNavHover = bool;
    }
    return {
        state,
        setRoutesList,
        setColumnsMenuHover,
        setColumnsNavHover
    }
})